function exportExcel(){
	var handleStr = '';
	$("#srchuserdiv input:checkbox").each(function(){
		if(this.checked){
			var id = $(this).val();
			if(handleStr.length == 0){
				handleStr += id;
			}else{
				handleStr += "_"+id;
			}
		}	
	});
	if(handleStr.length > 0){
		window.location = "index.php?c=Down&idStr="+handleStr;
	}
}


function changestate(eid, obj){
	var stateid = $(obj).val();
	if(stateid == 0){
		return;
	}
	var handleStr = '';
	$("#srchuserdiv input:checkbox").each(function(){
		if(this.checked){
			var id = $(this).val();
			if(handleStr.length == 0){
				handleStr += id;
			}else{
				handleStr += "_"+id;
			}
		}	
	});
	if(handleStr.length == 0){
		alert("请选择要操作的简历～");
		return;
	}
	$.ajax({
		type:"GET",
		url:"index.php?c=Ajax&a=ChangeState",
		data:"idstr="+handleStr+"&stateid="+stateid+"&eid="+eid,
		success:function(msg){
			if(msg == 1){
				alert("设置成功！");
			}else{
				alert("设置失败～");
			}	
		}
	});
}

function settag(eid,obj){
	var tagid = $(obj).val();
	if(tagid == 0){
		return false;
	}
	var handleStr = '';
        $("#srchuserdiv input:checkbox").each(function(){
                if(this.checked){
                        var id = $(this).val();
                        if(handleStr.length == 0){
                                handleStr += id;
                        }else{
                                handleStr += "_"+id;
                        }
                }
        });
        if(handleStr.length == 0){
                alert("请选择要操作的简历～");
                return;
        }
	$.ajax({
                type:"GET",
                url:"index.php?c=Ajax&a=SetTags",
                data:"idstr="+handleStr+"&tagid="+tagid+"&eid="+eid,
                success:function(msg){
                        if(msg == 1){
                                alert("设置成功！");
                        }else{
                                alert("设置失败～");
                        }
                }
        });

}

function sendmail(){
	var handleStr = '';
        $("#srchuserdiv input:checkbox").each(function(){
                if(this.checked){
                        var id = $(this).val();
                        if(handleStr.length == 0){
                                handleStr += id;
                        }else{
                                handleStr += "_"+id;
                        }
                }
        });
        if(handleStr.length == 0){
                alert("请选择要发送email的用户～");
                return;
        }
	var url = "index.php?c=Email&user_str="+handleStr;
	window.location = url;
}

function setplace(eid){
	var handleStr = '';
	$("#srchuserdiv input:checkbox").each(function(){
		if(this.checked){
			var id = $(this).val();
			if(handleStr.length == 0){
				handleStr += id;
			}else{
				handleStr += "_"+id;
			}
		}	
	});
	if(handleStr.length == 0){
		alert("请选择要操作的简历～");
		return;
	}
	var placetype = $("#placetype").val();
	var placelist = $("#placelist").val();
	var placetime = $("#placetime").val();
	$.ajax({
		type:"GET",
		url:"index.php?c=Ajax&a=SetPlace",
		data:"eid="+eid+"&idstr="+handleStr+"&placetype="+placetype+"&placelist="+placelist+"&placetime="+placetime,
		success:function(msg){
			if(msg == 1){
				alert("设置成功！");
			}else{
				alert(msg);
				//alert("设置失败～");
			}	
		}
	});
}
